package com.nanyuanbeizhi.service;

import com.nanyuanbeizhi.mapper.UserMapper;
import com.nanyuanbeizhi.pojo.User;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService{
    @Resource
    UserMapper userMapper;
    @Override
    public List<User> getUsers(int id){

        try {
            return userMapper.getUsers(id);
        }
        catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
    @Override
    public void addDongtai(String dongtai){
        userMapper.addDongtai(dongtai);
    }
    @Override
    public void updateUser(String name, String gender, String age, String birthday, String hometown, String signature){
        userMapper.updateUser(name,gender,age,birthday,hometown,signature);
    }

//    @Override
//    public Integer add(User user) {
//        return userMapper.add(user);
//    }
//
//    @Override
//    public Integer update(User user) {
//        return userMapper.update(user);
//    }


}